package com.bjpowerndoe.ylb.web.enums;

public enum CodeEnum {
    OK(1000,"请求成功!"),
    FAIL(1001,"请稍后重试!"),
    PHONE_FORMAT_ERR(1002,"手机号和格式不正确"),
    REQUEST_PARAM_ERR(1003,"请求参数有误!"),
    SMS_SEND_RETRY(2001,"请求重新发送短信!"), // 业务逻辑的错误
    SMS_CODE_USE(2002,"验证码可以继续使用!"),
    SMS_CODE_INVALID(2003,"验证码无效,请求重新获取!"),
    PHONE_REGISTER_USE(2004,"手机号已经注册过!"),
    PHONE_PASSWORD_ERR(2006,"手机号或密码错误!"),
    REALNAME_DOUBLE_ERR(2007,"已经认证过了,不能重复认证!"),
    ACCOUNT_NOT_EXISTS_ERR(2008,"资金账号不存在!"),
    ACCOUNT_MONEY_NOT_ENOUGHT_ERR(2009,"资金余额不足!"),
    PRODUCT_NOT_EXISTS_ERR(2010,"理财产品不存在!"),
    PRODUCT_LEFTMONEY_NOT_ENOUGH_ERR(2011,"理财产品余额不足!"),


    TOKEN_INVALID_ERR(4000,"请求重新登录!"),

    ;


    private int code;
    private String text;

    CodeEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }
}
